package com.sc.nft.service;

import com.sc.nft.dto.BindPaySendSmsVO;
import com.sc.nft.entity.UserInfo;
import com.sc.nft.entity.vo.GetPaySignVO;
import com.sc.nft.entity.vo.mall.MallWalletPayVO;
import com.sc.nft.enums.PayMethodEnum;
import com.sc.nft.exception.GlobalException;

import java.util.Date;

/**
 * IP商城支付
 */
public interface MallPayOrderService {

    /**
     * IP商城支付(钱包支付)
     * @param paymentMethod
     * @param orderId
     * @param user
     * @param ip
     */
    MallWalletPayVO mallWalletPay(PayMethodEnum paymentMethod, Long orderId, UserInfo user, String ip);

    /**
     * 绑卡支付发送短信
     * @param bankCardId
     * @param orderId
     * @param userInfo
     */
    Long sandMallBindPaySendSms(Long bankCardId, Long orderId, UserInfo userInfo,String IP);

    /**
     * 认证短信支付
     * @param payOrderId
     * @param smsCode
     * @param userInfo
     * @return
     */
    void sandMallBindPay(Long payOrderId, String smsCode, UserInfo userInfo);

    /**
     * 支付成功(回调)
     * @param orderCode
     * @param payTime
     * @param result
     * @throws GlobalException
     */
    void paySuccess(String orderCode, Date payTime, String result, PayMethodEnum payType) throws GlobalException;
    /**
     * 退款成功(回调)
     * @param orderCode
     * @param payTime
     * @param result
     * @throws GlobalException
     */
    void refundSuccess(String orderCode, String payTime, String result,PayMethodEnum payType) throws GlobalException;

    /**
     * 获取支付参数
     * @param orderId
     * @param userInfo
     */
    GetPaySignVO getMallPay(PayMethodEnum payMethod, Long orderId, UserInfo userInfo, String IP, String mac,Boolean webPay,Integer jumpType);

    /**
     * 获取支付结果
     * @param orderNo
     * @return
     */
    MallWalletPayVO getMallPayResult(String orderNo);

    /**
     * 连连支付发送短信
     * @param bankCardId
     * @param orderId
     * @param userInfo
     * @param IP
     * @return
     */
    BindPaySendSmsVO llBindPaySendSms(Long bankCardId, Long orderId, UserInfo userInfo, String IP);

    /**
     * 连连支付短信验证
     * @param userInfo
     * @param id
     * @param token
     * @param smsCode
     */
    void llPayVerify(UserInfo userInfo,Long id,String token,String smsCode);
}
